#【尖牙锁链】
execute as @a[tag=BOSSmieshang,scores={skStone_sword1=1..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/0liansuo
#【尖牙锁链】重复连锁
execute as @e[tag=BOSSmieshang,type=evoker_fangs,scores={skTimeKe=20}] at @s run effect give @a[scores={BOSSmieshang5=1..},distance=..4] slowness 2 1 true
execute as @e[tag=BOSSmieshang,type=evoker_fangs,scores={skTimeKe=20}] at @s at @a[scores={BOSSmieshang5=1..},distance=..4] run summon minecraft:evoker_fangs ~ ~ ~ {Tags:[BOSSmieshang],Warmup:4}
execute as @e[tag=BOSSmieshang,type=evoker_fangs,scores={skTimeKe=20}] at @s run scoreboard players set @a[scores={BOSSmieshang5=1..},distance=..4] BOSSmieshang5 0

#【生命汲取】杀人回血
execute as @a[tag=BOSSmieshang,scores={skKill=1..}] run effect give @s instant_health 1 0 true
execute as @a[tag=BOSSmieshang,scores={skKill=1..}] run scoreboard players set @s skCDJPG 0
execute as @a[tag=BOSSmieshang,scores={skKill=1..}] run scoreboard players reset @s skKill


#【汲取魔牙】
execute as @a[tag=BOSSmieshang,scores={skEgg=1..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/1jianya
#【汲取魔牙】CD
execute as @a[tag=BOSSmieshang,scores={skCDEgg=0}] at @s run function nw:yingxiong/0boss/01mieshang/skill/1jianya_cd

#【横扫千军】
execute as @a[tag=BOSSmieshang,scores={skDiamond_sword1=1..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/2hengsao
#【横扫千军】CD
execute as @a[tag=BOSSmieshang,scores={skCDJPG=0}] at @s run function nw:yingxiong/0boss/01mieshang/skill/2hengsao_cd

#【魔裂千世】
execute as @a[tag=BOSSmieshang,scores={skEXBottle=1..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/3qianshi
#【魔裂千世】二段：1.5s延迟后的法阵
execute as @e[type=armor_stand,tag=mieshang,scores={skTimeKe=30..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/3fazhen1
#【魔裂千世】三段：6s延迟后拉回 6:120 + 1.5:30 = 150
execute as @e[type=armor_stand,tag=mieshang,scores={skTimeKe=150..}] at @s run function nw:yingxiong/0boss/01mieshang/skill/3fazhen2
#【魔裂千世】CD
execute as @a[tag=BOSSmieshang,scores={skCDEXBottle=0}] at @s run function nw:yingxiong/0boss/01mieshang/skill/3qianshi_cd


#【魔裂千世】效果&特效
#其他玩家效果
execute as @e[type=armor_stand,tag=mieshang,scores={skTimeKe=30..}] at @s run effect clear @a[distance=..6,tag=!BOSSmieshang] resistance
execute as @e[type=armor_stand,tag=mieshang,scores={skTimeKe=30..}] at @s run effect clear @a[distance=..6,tag=!BOSSmieshang] speed
#特效
execute as @e[type=armor_stand,tag=mieshang,scores={skTimeKe=30..}] at @s run particle minecraft:entity_effect ~ ~-0.2 ~ 1.7 0.2 1.7 0.01 20

#显示范围特效
execute as @e[type=armor_stand,tag=mieshang] at @s run tp @s ~ ~ ~ ~4 ~
execute as @e[type=armor_stand,tag=mieshang] at @s rotated ~ 0 positioned ^ ^0.2 ^6 run particle minecraft:smoke ~ ~ ~ 0.1 0.1 0.1 0.01 1 normal @a
execute as @e[type=armor_stand,tag=mieshang] at @s run tp @s ~ ~ ~ ~4 ~
execute as @e[type=armor_stand,tag=mieshang] at @s rotated ~ 0 positioned ^ ^0.2 ^-6 run particle minecraft:smoke ~ ~ ~ 0.1 0.1 0.1 0.01 1 normal @a
execute as @e[type=armor_stand,tag=mieshang] at @s run tp @s ~ ~ ~ ~4 ~
execute as @e[type=armor_stand,tag=mieshang] at @s rotated ~ 0 positioned ^ ^0.2 ^6 run particle minecraft:smoke ~ ~ ~ 0.1 0.1 0.1 0.01 1 normal @a
execute as @e[type=armor_stand,tag=mieshang] at @s run tp @s ~ ~ ~ ~4 ~
execute as @e[type=armor_stand,tag=mieshang] at @s rotated ~ 0 positioned ^ ^0.2 ^-6 run particle minecraft:smoke ~ ~ ~ 0.1 0.1 0.1 0.01 1 normal @a


#【恶魔之触】对未携带的目标
execute as @a[scores={BOSSmieshang5=..0}] run scoreboard players operation @s BOSSmieshang5 *= 系统倒数 SystemPlayer

execute as @a[tag=BossAlready,tag=BOSSmieshang] run title @s actionbar [{"text":"汲取魔牙","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEgg","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 横扫千军","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDJPG","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 魔裂千世","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEXBottle","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
